package com.example.shengyin.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

@Data
@ApiModel("题目类")
public class SurveyQues {

    @ApiModelProperty("编号")
    private Long id;

    @NotNull(message = "标题不能为空")
    @ApiModelProperty("姓名")
    private String title;

    @Range(min = 1,message = "类别不能小于0")
    @ApiModelProperty("类别")
    private Long stype;

    @NotNull(message = "选项1不能为空")
    @ApiModelProperty("选项1")
    private String option1;
    @NotNull(message = "选项2不能为空")
    @ApiModelProperty("选项2")
    private String option2;
    @NotNull(message = "选项3不能为空")
    @ApiModelProperty("选项3")
    private String option3;
    @NotNull(message = "选项4不能为空")
    @ApiModelProperty("选项4")
    private String option4;

    @NotNull(message = "选项1分值不能为空")
    @ApiModelProperty("选项1分值")
    private short opvalue1;

    @NotNull(message = "选项2分值不能为空")
    @ApiModelProperty("选项2分值")
    private short opvalue2;

    @NotNull(message = "选项3分值不能为空")
    @ApiModelProperty("选项3分值")
    private short opvalue3;
    @NotNull(message = "选项4分值不能为空")
    @ApiModelProperty("选项4分值")
    private short opvalue4;

   // @ApiModelProperty("发布人")
    private String poster;

    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm")
   // @ApiModelProperty("发布时间")
    private Date posttime;

    @NotNull(message = "解释不能为空")
    @ApiModelProperty("解释")
    private String explaination;
    private String choice;
    private String symname;


}
